load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "build_bazel_rules_nodejs",
    sha256 = "0f2de53628e848c1691e5729b515022f5a77369c76a09fbe55611e12731c90e3",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.0.1/rules_nodejs-2.0.1.tar.gz"],
)

load("@build_bazel_rules_nodejs//:index.bzl", "npm_install")

# emscripten 2.0.3
http_archive(
    name = "emscripten",
    sha256 = "3d1bcbf01104c83595f769f65f9c57eceb6e9f6be8d115e80ff6a44c22570b32",
    strip_prefix = "install",
    url = "https://storage.googleapis.com/webassembly/emscripten-releases-builds/linux/7a7f38ca19da152d4cd6da4776921a0f1e3f3e3f/wasm-binaries.tbz2",
    build_file = "//emscripten_toolchain:emscripten.BUILD",
    type = "tar.bz2",
)

npm_install(
    name = "npm",
    package_json = "@emscripten//:emscripten/package.json",
    package_lock_json = "@emscripten//:emscripten/package-lock.json",
)
